package com.example.springbootproject.mianshi.singleton;

public class Singleton05 {

    private static Singleton05 INSTANCE;

    public static Singleton05 getInstance() throws InterruptedException {
        synchronized (Singleton05.class){
            if (INSTANCE == null){
                Thread.sleep(1000);
                INSTANCE = new Singleton05();
            }
            return INSTANCE;
        }
    }

    private Singleton05(){

    }

}
